package czk;

/**
 *
 */
public class Singleton {
    private volatile static   Singleton singleton=null;
    private Singleton(){}
    public static Singleton getSingleton(){
        if (singleton==null){
            singleton=new Singleton();
        }
        return singleton;
    }
    private void fun_1(){
        System.out.println(111);
    }
    public static void main(String[] args) {
        Singleton singleton = Singleton.getSingleton();
        singleton.fun_1();
    }
}
